import { defineStore } from 'pinia'
import { GetCaptcha } from '@/api/common'

export const useCommonStore = defineStore('common', () => {
    function getCaptchaAction(requestData) {
        return new Promise((resolve, reject) => {
            GetCaptcha(requestData)
                .then(response => {
                    resolve(response)
                }).catch(error => {
                    reject(error)
                })
        })
    }
    return { getCaptchaAction }
})